#pragma once


#include "../Utilities/utilities.h"

#include "Vertex.h"
#include "Shaders.h"
#include "camera.h"
#include "model.h"
//#include "model.h"
#define TRANSLATE_STEP 1.0f
#define ROTATE_STEP 0.1f
#define SCALE_STEP 0.1f

#define LOAD_FAILED -1
#define LOAD_SUCCEEDED 0
class Object
{
protected:
	char fs_path[100];
	char vs_path[100];
	GLuint vbo, ibo, texture_id, normal_map_id;
	Model model;
	GLint lightPositionUniform, normalMapUniform;
	GLint lightColorUniform;
	GLint tangentAttribute, bitangentAttribute;
	Vector3 lightPosition;
	Vector3 lightColor;
protected:
	Vector3 displace, rotate, scale;
	Matrix worldMatrix;
	Shaders myShaders;
	virtual void calculateWorldMatrix();
public:
	// Movement
	virtual void setNormalMap(char* tga);
	virtual void Scale(float Sx, float Sy, float Sz);
	virtual void Rotate(float Rx, float Ry, float Rz);
	virtual void Place(float Px, float Py, float Pz);
	virtual void moveLeft();
	virtual void moveRight();
	virtual void moveForward();
	virtual void moveBackward();
	virtual void RotateLeft();
	virtual void RotateRight();
	virtual void RotateUp();
	virtual void RotateDown();
	virtual Matrix getWorldMatrix();
	void setLightPosition(Vector3 light_pos){lightPosition = light_pos;}
	// Load
	virtual int Load(char* file_nfg, char* file_tga);
	virtual void Draw( ESContext *esContext, Camera * camera);
	virtual void Update ( ESContext *esContext, float deltaTime);
	Object(void);
	virtual ~Object(void);
};
